package com.huang.service.crud;

import com.huang.service.impl.IEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class EmailServiceImpl implements IEmailService {

	@Autowired
	private JdbcTemplate jdbcTemplate;

	@Override
	@Transactional(propagation = Propagation.SUPPORTS)
	public void addEmailInfo() {
		String sql = "insert into email values (?,?)";
		jdbcTemplate.update(sql, null, "有一个用户注册成功！");
	}
}
